import QtQuick 2.0

//注意：显示和关闭一定是调用show()  &  close()
//不能使用visible | destory
Rectangle {
    id: root
    visible: false
    color: "#4C1A1A1A"
    anchors.fill: parent
    anchors.topMargin: 0
    function show() { visible = true }
    function close() { visible = false }
    function isShow() { return visible === true }

    onVisibleChanged: {
        if( visible ){        
            color = "#4C1A1A1A"
        }else{
            color = "transparent"
        }
    }

    MouseArea {
        anchors.fill: parent;
        hoverEnabled: true
        onPressed: { mouse.accepted = true; focus = true }
        onWheel: { }
    }

    DropArea {
        anchors.fill: parent
        onEntered: { }
        onExited: { }
        onDropped: { }
    }
}
